package cn.ywang.concurrent.seven;

import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;

/**
 * @author BeatificWang
 * @date 2019/8/1 21:41
 */
public class MessageDemo {
	public static void main(String[] args) {
		BlockingQueue<String> queue = new LinkedBlockingQueue<>(6);
		new MessageReceiver(queue).start();
		for (int i = 0; i < 100; i++) {
			new MessagePulisher(queue, "hello_" + i).start();
		}
	}
}
